import { defineConfig } from "vite";
import { resolve } from "path";
import vue from "@vitejs/plugin-vue";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: "0.0.0.0",
    https: false,
    cors: true,
    open: true,
    port: "9001",
    strictPort: false,
    force: true,
    hmr: false,
    watch: {
      ignored: ["!**/node_modules/your-package-name/**"],
    },
    proxy: {
      "/api": {
        target: "http://localhost:9010",
        changeOrigin: true,
      },
    },
  },
  base: "./",
  resolve: {
    alias: [{ find: "@", replacement: resolve(__dirname, "src") }],
  },
});
